<?php

namespace app\validate;

use think\Validate;

class Goods extends Validate
{
    protected $rule = [
        'category_id' => 'require',
        'goods_name' => 'require',
        'goods_img' => 'require',
        'goods_price' => 'require'
    ];
    protected $message = [
        'category_id.require' => '分类ID必填',
        'goods_name.require' => '商品名称必填',
        'goods_img.require' => '商品图片必填',
        'goods_price.require' => '商品价格必填'
    ];
    protected $scene = [
        'add','edit'
    ];
}